import 'package:flutter/material.dart';

import '../tool/assets.dart';

class PickImage extends StatefulWidget {
  Function() onClick;
  PickImage({super.key, required this.onClick});

  @override
  State<PickImage> createState() => _PickImageState();
}

class _PickImageState extends State<PickImage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 200,
      height: 60,
      clipBehavior: Clip.hardEdge,
      decoration: BoxDecoration(
        color: Colors.black.withOpacity(0.6),
        borderRadius: BorderRadius.circular(8),
      ),
      child: InkWell(
        onTap: widget.onClick,
        borderRadius: BorderRadius.circular(8),
        child: Padding(
          padding: const EdgeInsets.only(left: 10, right: 10),
          child: ListTile(
            contentPadding: EdgeInsets.zero,
            minVerticalPadding: 0,
            visualDensity: const VisualDensity(vertical: -4, horizontal: 0),
            trailing: Image.asset(
              assets.album,
              height: 26,
              fit: BoxFit.cover,
            ),
            title: const Text(
              'Pick from  Image',
              style: TextStyle(color: Colors.white),
            ),
            subtitle: const Text(
              'Pro Feature',
              style: TextStyle(color: Color(0xFF878787)),
            ),
          ),
        ),
      ),
    );
  }
}
